package filter;

import java.util.ArrayList;
import java.util.List;

public class CriteriaSingle implements Criteria {
    @Override
    public List<Person> meetCriteria(List<Person> criteria) {

        List<Person> singlePersons = new ArrayList<>();
        for (Person person : criteria) {
            if (person.getMaritalStatus().equalsIgnoreCase("SINGLE")){
                singlePersons.add(person);
            }
        }

        return singlePersons;
    }
}
